package com.ciaojian.client.controller;

import com.ciaojian.core.model.MarketingScan;
import com.ciaojian.core.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Atlakyn
 */
@Api(tags = "扫码页面")
@RestController
@RequestMapping("/market-scan")
public class MarketingScanController {

    @ApiOperation("获取扫码页面信息")
    @ApiResponses({@ApiResponse(code = 200, message = "SUCCESS", response = MarketingScan.class)})
    @GetMapping("{id}")
    public Result get(@PathVariable Integer id) {
        return Result.ok(new MarketingScan().selectById(id));
    }
}
